#ifndef __VCD_JSON_PARSER_H__
#define __VCD_JSON_PARSER_H__

#include <string.h>
#include <stdio.h>
#include <config.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
#include <glib/gprintf.h>
#include <glib/gi18n.h>
#include <ctype.h>
#include <json-glib/json-glib.h>
#include <curl/curl.h>

#include "vcd-util.h"

G_BEGIN_DECLS

int json_parser_get_vm_info(char *memory, vm_info** pp_info, int *count, char *err_msg);
int json_parser_get_spice_config(char *memory, vm_config_response* resp);
gboolean json_parser_get_server_ip(char *memory, char ***ppp_ip, int* count);
int json_parser_get_spice_proxy(char *memory, spice_proxy_data* d);
int json_parser_get_ticket(char *memory, ticket_param *p);
int json_parser_get_rdp_guest_system_type(char *memory, char *error);
gboolean json_parser_get_rdp_guest_ip(char *memory, char *ip);
gboolean json_parser_get_rdp_guest_ip_with_net0(char *memory, char *ip,char* net0);

int parse_connecting_num(char* memory, int* pre_link);
int parse_client_disconnect(char *memory, disconnect_res* s);

gboolean vcd_json_parser_spice_connect_data(const char* json_str, spice_connect_data* scd);
gboolean vcd_json_parser_api_user_login(const char* json_str,vcd_api_login_data* vld);
gboolean vcd_json_parser_api_vm_vclient(const char* json_str,vcd_api_vclient_data* vvd);

int json_parser_heartbeat_record_user_pass_config(char *memory, int *count, char *err_msg);


G_END_DECLS

#endif
